package com.yh.ldzl.mapper;

import com.yh.ldzl.domain.QcIqc;
import org.apache.ibatis.annotations.Param;

import java.util.List;
import java.util.Map;

/**
 * ldzl-qcMapper接口
 * 
 * @author yanghuai
 * @date 2025-07-02
 */
public interface QcIqcMapper 
{
    /**
     * 查询ldzl-qc
     * 
     * @param iqcId ldzl-qc主键
     * @return ldzl-qc
     */
    public QcIqc selectQcIqcByIqcId(Long iqcId);

    /**
     * 查询ldzl-qc列表
     * 
     * @param qcIqc ldzl-qc
     * @return ldzl-qc集合
     */
    public List<QcIqc> selectQcIqcList(QcIqc qcIqc);

    /**
     * 新增ldzl-qc
     * 
     * @param qcIqc ldzl-qc
     * @return 结果
     */
    public int insertQcIqc(QcIqc qcIqc);

    /**
     * 修改ldzl-qc
     * 
     * @param qcIqc ldzl-qc
     * @return 结果
     */
    public int updateQcIqc(QcIqc qcIqc);

    /**
     * 删除ldzl-qc
     * 
     * @param iqcId ldzl-qc主键
     * @return 结果
     */
    public int deleteQcIqcByIqcId(Long iqcId);

    /**
     * 批量删除ldzl-qc
     * 
     * @param iqcIds 需要删除的数据主键集合
     * @return 结果
     */
    public int deleteQcIqcByIqcIds(Long[] iqcIds);

    int selectQcIqcCodeUnique(@Param("source_doc_id") int source_doc_id,@Param("material_code") String material_code);

    int selectQcIqcLineCodeUnique(@Param("iqc_code") String iqc_code);

    QcIqc selectQcIqcDetail(@Param("iqc_code") String iqc_code);

    QcIqc selectQcIqcId(@Param("source_doc_id") Long source_doc_id);

    List<Map<String,Object>> selectCkProductRecptDetectSingle(@Param("recpt_code") String recpt_code,@Param("recpt_name") String recpt_name );

    List<Map<String,Object>> selectCkProductRecptGoodsCode(@Param("recpt_id") Long recpt_id );
    int updateCkItemRecptLineStatus(@Param("line_id") Long line_id,@Param("status") String status,@Param("iqc_id") Long iqc_id);
    Long selectCkItemRecptLineLineId(@Param("recpt_id") Long recpt_id,@Param("goods_code") String goods_code);
    int selectCkItemRecptTestResults(@Param("recpt_id") Long recpt_id);

}
